<template>
	<div>

		<!-- 编辑体检项目信息弹框 -->
		<el-dialog title="编辑体检项目信息" :visible.sync="dialogFormVisible" :append-to-body="true" width="90%"
			class="top_dialog">
			<el-form :model="form" label-position="left">
				<div class="add_info">
					<div class="info_l">
						<div class="info_l_head">
							<!-- <el-form-item class="" label="部门信息" :label-width="formLabelWidth">
                <el-select
                  class="form_select"
                  style="width:40%"
                  v-model="form.region"
                  size="medium"
                  placeholder="部门"
                >
                  <el-option label="人事" value="shanghai"></el-option>
                  <el-option label="财务" value="shanghai"></el-option>
                </el-select>
              </el-form-item> -->
							<el-divider></el-divider>
						</div>
						<div>
							<div class="dialog_flex">
								<div>
									<el-form-item label="项目名称" :label-width="formLabelWidth">
										<el-input v-model="form.itemName" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="代码" :label-width="formLabelWidth">
										<el-input v-model="form.searchChar" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="项目类型" :label-width="formLabelWidth">
										<el-select v-model="form.itemKind" placeholder="请选择项目类型">
											<el-option label="区域一" value="shanghai"></el-option>
											<el-option label="区域二" value="beijing"></el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="条码张数" :label-width="formLabelWidth">
										<el-input v-model="form.printnum" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="适用范围" :label-width="formLabelWidth">
										<el-select v-model="form.applyTo" placeholder="请选择适用范围">
											<el-option label="不限" :value="-1"></el-option>
											<el-option label="男性" :value="1"></el-option>
											<el-option label="女性" :value="2"></el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="最大限量" :label-width="formLabelWidth">
										<el-input v-model="form.everydayLimitqty" autocomplete="off"></el-input>
									</el-form-item>
								</div>
								<div class="dialog_flex_r">
									<el-form-item label="编码" :label-width="formLabelWidth">
										<el-input v-model="form.itemCode" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="显示排序" :label-width="formLabelWidth">
										<el-input v-model="form.sequence" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="显示排序" :label-width="formLabelWidth">
										<el-input v-model="form.lstExamItemContents.sequence" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="分组" :label-width="formLabelWidth">
										<el-input v-model="form.groupName" autocomplete="off"></el-input>
									</el-form-item>
									<el-form-item label="定价" :label-width="formLabelWidth">
										<el-input v-model="form.price" autocomplete="off"></el-input>
									</el-form-item>
									<!-- <div v-if="set==1">
										<el-alert :closable="false" title="" type="warning"
											description="注意：0不限，超过最大限量后，不能再预约该日的项目。" show-icon>
										</el-alert>
									</div> -->
								</div>
							</div>
							<el-form-item label="编辑时间" :label-width="formLabelWidth">
								<el-input v-model="form.editTime" autocomplete="off"></el-input>
							</el-form-item>
							<el-form-item label="项目说明" :label-width="formLabelWidth">
								<el-input type="textarea" v-model="form.desc"></el-input>
							</el-form-item>
							<el-form-item label="是否启用">
								<el-checkbox-group v-model="form.status">
									<el-checkbox class="info_sel_r_group" label="0" name="type"></el-checkbox>
									<el-checkbox class="info_sel_r_group" label="1" name="type"></el-checkbox>
								</el-checkbox-group>
							</el-form-item>
						</div>
					</div>
					<div class="info_r">
						<div>
							<span>添加项目内容 (6)</span>
							<el-button style="margin-left:20px" size="medium" type="primary">添加</el-button>
							<el-divider></el-divider>
						</div>
						<div>
							<projectlist :grade="2"></projectlist>
						</div>
					</div>
				</div>

			</el-form>
			<div slot="footer" class="dialog-footer">
				<el-button type="primary" @click="dialogFormVisible = false">保 存</el-button>
				<el-button @click="dialogFormVisible = false">取 消</el-button>
			</div>
		</el-dialog>
	</div>
</template>

<script lang="ts">
	import Vue from 'vue'

	import projectlist from "./projectlist.vue";
	export default {
		components: {
			projectlist
		},
		data() {
			return {
				formLabelWidth: '80px',
				form: {

				},

			}
		},
		props: {
			dialogFormVisible: {
				type: Boolean,
				default: true,
			},
			set: {
				type: Number,
				default: true,
			},
			form:{
				type:Object
			}
		}
	}
</script>

<style scoped>
	.el_tab {
		margin-top: 20px;
	}

	.add_info {
		display: flex;
		padding: 0px 30px;

	}

	.info_l {
		text-align: left;

		/* flex: 1; */
	}

	.info_r {
		width: 60%;
		text-align: left;
		flex: 1;
		margin-left: 30px;
	}

	.info_sel {
		display: flex;
	}

	.info_sel_r {
		margin-left: 20px;
	}

	.top_dialog /deep/ .el-dialog__body {
		padding: 0px !important;
	}

	.block {
		text-align: center;
		margin-top: 10px;
		/* margin:0px auto; */
	}

	.dialog_flex {
		display: flex;
	}

	.dialog_flex_r {
		margin-left: 20px;
	}

	.info_sel_r_group {
		margin-left: 10px;
	}

	.top_dialog /deep/ .el-dialog {
		margin-top: 5vh !important;
	}
</style>
